#从键盘输入一个字符序列，统计，大写字母，小写字母，数字，其它字符各出现次数，将次数保存到字典中。
def CharStatistics(chars):
    charDict = {'upper':0, 'lower':0, 'digit':0, 'other':0}
    for i in chars:
        if i.isupper():
            charDict['upper'] += 1
        elif i.islower():
            charDict['lower'] += 1
        elif i.isdigit():
            charDict['digit'] += 1
        else:
            charDict['other'] += 1
    return  charDict